

//同步操作
const mutations={
/**通知管理---------------------------------------------------- */
    //数据的添加同时时查看全部
    allnn(state,log){
        state.setupNnData = log
    },
    //修改时获取他们的数据
    updatenn(state,log){
        state.setupNnupdate = {
            //admin_id:1,
            n_title:state.setupNnData[log].n_title,
            n_content:state.setupNnData[log].n_content,
            notification_id:state.setupNnData[log].notification_id
        }
    },

    /**--------------------------------客服管理------------- */
    allcsm(state,log){
        state.setupCsmData = log
    },

    groupcsm(state,log){
        state.setupCsmOptions = log
    },
    updatecsm(state,log){
        state.setupCsmUpdate = {
            c_s_nickname:state.setupCsmData[log].c_s_nickname,
            c_s_name:state.setupCsmData[log].c_s_name,
            c_s_account:state.setupCsmData[log].c_s_account,
            c_s_password:state.setupCsmData[log].c_s_password,
            customer_service_id:state.setupCsmData[log].customer_service_id,
            group_no:state.setupCsmData[log].group_no,
            group_id:state.setupCsmData[log].group_id
        }
    },
      /**--------------------------------分组管理------------- */
  allgroup(state,log){
    state.setupGroupData = log
  },
  updategroup(state,log){
    state.setupGroupUpdate = {
        g_name:state.setupGroupData[log].g_name,
        group_no:state.setupGroupData[log].group_no
    }
  },
   /**--------------------------------预设问题------------- */
  allpp(state,log){
    state.setupPpData = log
  },
  updatepp(state,log){
    state.setupPpUpdate = {
        q_content:state.setupPpData[log].q_content,
        q_answer:state.setupPpData[log].q_answer,
        question_id:state.setupPpData[log].question_id
    }
  },
    /**--------------------------------黑名单------------- */
      allbl(state,log){
        state.setupBlData = log
      },
      updatebl(state,log){

        if( state.setupBlData[log].c_email === null){
          state.setupBlData[log].c_email = "用户未填写邮箱"
          
        }
        state.setupBlUpdate = {
          c_nickname:state.setupBlData[log].c_nickname,
          c_name:state.setupBlData[log].c_name,
          c_phone:state.setupBlData[log].c_phone,
          c_email:state.setupBlData[log].c_email,
          c_s_name:state.setupBlData[log].c_s_name,
          b_reson:state.setupBlData[log].b_reson,
          u_time:state.setupBlData[log].u_time,
        }
        
        
      },
        /**--------------------------------常用语------------- */
      cwgroupall(state,log){
        state.setupCwGroupData = log
      },
      cwall(state,log){
        state.setupCwData = log
      }
   
}
export default mutations